<#include "common/header2.ftl" />
</head>

<body data-type="generalComponents">

<#include "common/page_top2.ftl" />
<div class="tpl-page-container tpl-page-header-fixed">

    <#include "common/menu.ftl" />

    <div class="tpl-content-wrapper">
        <div class="tpl-content-page-title">
            Amaze UI 表单
        </div>
        <ol class="am-breadcrumb">
            <li><a href="#" class="am-icon-home">首页</a></li>
            <li><a href="#">表单</a></li>
            <li class="am-active">Amaze UI 表单</li>
        </ol>
        <div class="tpl-portlet-components">
            <div class="portlet-title">
                <div class="caption font-green bold">
                    <span class="am-icon-code"></span> 表单
                </div>
                <div class="tpl-portlet-input tpl-fz-ml">
                    <div class="portlet-input input-small input-inline">
                        <div class="input-icon right">
                            <i class="am-icon-search"></i>
                            <input type="text" class="form-control form-control-solid" placeholder="搜索..."> </div>
                    </div>
                </div>


            </div>

            <div class="tpl-block">

                <div class="am-g">
                    <div class="tpl-form-body tpl-form-line">
                        <form method="post" class="am-form tpl-form-line-form" enctype="multipart/form-data" action="/admin/category/save" >
                            <input type="hidden" value="${category.id}" name="id" >
                            <div class="am-form-group">
                                <label for="user-name" class="am-u-sm-3 am-form-label">标题 <span class="tpl-form-line-small-title">Title</span></label>
                                <div class="am-u-sm-9">
                                    <input type="text" name="title" required value="${category.title}" class="tpl-form-input" id="user-name" placeholder="请输入标题文字">
                                    <small>请填写标题文字10-20字左右。</small>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="parent" class="am-u-sm-3 am-form-label">所属分类 <span class="tpl-form-line-small-title">Parent</span></label>
                                <div class="am-u-sm-9">
                                    <select name="pid" id="parent" data-am-selected="{searchBox: ${category.pid}}">
                                        <option value="0">顶级分类</option>
                                        <#list list as item >
                                            <option value="${item.id}">${item.title}</option>
                                        </#list>
                                    </select>
                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-weibo" class="am-u-sm-3 am-form-label">封面图 <span class="tpl-form-line-small-title">Images</span></label>
                                <div class="am-u-sm-9">
                                    <div class="am-form-group am-form-file">
                                        <div class="tpl-form-file-img">
                                            <#if (category.thumb)?? && category.thumb !="" >
                                                <img style="width: 80px" src="${category.thumb}" alt="">
                                                <#else >
                                                    <img style="width: 80px" src="/resource/assets/img/user03.png" alt="">
                                            </#if>
                                        </div>
                                        <button type="button" class="am-btn am-btn-danger am-btn-sm">
                                            <i class="am-icon-cloud-upload"></i> 添加封面图片</button>
                                        <input id="doc-form-file" type="file" name="file" multiple>
                                    </div>

                                </div>
                            </div>

                            <div class="am-form-group">
                                <label for="user-intro" class="am-u-sm-3 am-form-label">状态</label>
                                <div class="am-u-sm-9">
                                    <div class="tpl-switch">
                                        <input type="checkbox" name="status" class="ios-switch bigswitch tpl-switch-btn" />
                                        <div class="tpl-switch-btn-view">
                                            <div>
                                            </div>
                                        </div>
                                    </div>

                                </div>
                            </div>

                            <#--<div class="am-form-group">-->
                                <#--<label for="user-intro" class="am-u-sm-3 am-form-label">分类描述</label>-->
                                <#--<div class="am-u-sm-9">-->
                                    <#--<textarea class="" rows="6" id="user-intro" placeholder="请输入分类描述"></textarea>-->
                                <#--</div>-->
                            <#--</div>-->

                            <div class="am-form-group">
                                <div class="am-u-sm-9 am-u-sm-push-3">
                                    <button type="submit" class="am-btn am-btn-primary tpl-btn-bg-color-success ">提交</button>
                                </div>
                            </div>
                        </form>

                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<script src="/resource/assets/js/jquery.min.js"></script>
<script src="/resource/assets/js/amazeui.min.js"></script>
<script src="/resource/assets/js/app.js"></script>
</body>

</html>